package com.springframework.DI_t.basicDataType_DI;

import org.junit.jupiter.api.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DIRun {

    @Test
    public void run(){
        ApplicationContext context = new ClassPathXmlApplicationContext("com.springframework/DI_t/bean.xml");
        Book book = context.getBean("book",Book.class);
        System.out.println(book.getBookName());
        System.out.println(book.getBookAuthor());
    }

    @Test
    public void DIRun(){
        ApplicationContext context = new ClassPathXmlApplicationContext("com.springframework/DI_t/bean.xml");
        Book book = context.getBean("bookCon",Book.class);
        System.out.println(book);
    }
}